import { ApplicationConfig } from '@angular/core';
import {
  provideRouter,
  withViewTransitions,
} from '@angular/router';

import { routes } from './app.routes';
import { AbsInfoService } from './basic-demo/interface';
import { TITLE } from './basic-demo/token';

export const appConfig: ApplicationConfig = {
  providers: [
    provideRouter(routes, withViewTransitions()),
    // {
    //   provide: INFO,
    //   useValue: {
    //     inform: () => 'InfoService from useValue',
    //   },
    // },
    // InfoService,
    // {
    //   provide: AbsInfoService,
    //   useExisting: InfoService,
    //   multi: true,
    // },
    {
      provide: AbsInfoService,
      useValue: {
        inform: () => 'Info service from a value provider',
      },
      multi: true,
    },
    {
      provide: TITLE,
      useValue: 'Info Demo Component',
    },
  ],
};
